<template>
 <div>
    <div v-if="$route.name == '数据审核' ">
      <!--pageheader-->
      <div
        id="contentwrapper"
        class="contentwrapper"
      >

 <div class="row">
          <div class="col-lg-12">
            <div class="panel">
              <div class="panel-heading">
                <h4>0 源数据</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a
                        @click="go({name:'1.1 名称'})"
                      >1.1 名称</a></div>
                    <div class="f14px-50b"><a @click="go({name:'1.6 机构设置'})">1.6 机构设置</a></div>
                    <div class="f14px-50b"><a @click="go({name:'6.1 教师基本情况'})">6.1 教师基本情况</a></div>
                      <div class="f14px-50b"><a @click="go({name:'7.1.1 开设专业'})">7.1.1 开设专业</a></div>
                  
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'7.2 课程设置'})">7.2 课程设置</a></div>
                    <div class="f14px-50b"><a @click="go({name:'10.1.1 学生基本信息'})">10.1.1 学生基本信息</a></div>
                  </div>
                </div>
              </div>

            </div>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <div class="panel">
              <div class="panel-heading">
                <h4>1 基本信息</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a
                        @click="go({name:'1.1 名称'})"
                      >1.1 名称</a></div>
                    <div class="f14px-50b"><a @click="go({name:'1.2 联系'})">1.2 联系</a></div>
                    <div class="f14px-50b"><a @click="go({name:'1.3 招生计划'})">1.3 招生计划</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'1.4 招生方式'})">1.4 招生方式</a></div>
                    <div class="f14px-50b"><a @click="go({name:'1.5 当年9月1日前在校生'})">1.5 当年9月1日前在校生</a></div>
                  
                  </div>
                </div>
              </div>

            </div>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>2 院校领导</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'2.1 基本情况'})">2.1 基本情况</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'2.2 参与教学联系学生'})">2.2 参与教学联系学生</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>3 基本办学条件</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a  @click="go({name:'3.1 占地、建筑面积'})">3.1 占地、建筑面积</a></div>
                    <div class="f14px-50b"><a  @click="go({name:'3.2 馆藏图书资料'})">3.2 馆藏图书资料</a></div>
                    <div class="f14px-50b"><a  @click="go({name:'3.3 阅览室、机房、教室'})">3.3 阅览室、机房、教室</a></div>
                    <div class="f14px-50b"><a  @click="go({name:'3.4.1 信息化建设概况'})">3.4.1 信息化建设概况</a></div>
                 
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a  @click="go({name:'3.4.2 管理信息系统'})">3.4.2 管理信息系统</a></div>
                    <div class="f14px-50b"><a  @click="go({name:'3.4.3 信息化工作机构与人员'})">3.4.3 信息化工作机构与人员</a></div>
                    <div class="f14px-50b"><a  @click="go({name:'3.5 固定资产'})">3.5 固定资产</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>4 实践教学条件</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'4.1 校内实践基地'})">4.1 校内实践基地</a></div>
                    <div class="f14px-50b"><a @click="go({name:'4.2 校外实习实训基地'})">4.2 校外实习实训基地</a></div>

                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'4.3 职业技能鉴定机构'})">4.3 职业技能鉴定机构</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>5 办学经费</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'5.1.1 学费收入'})">5.1.1 学费收入</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.1.2 财政经常性补助收入'})">5.1.2 财政经常性补助收入</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.1.3 中央、地方财政专项投入'})">5.1.3 中央、地方财政专项投入</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.1.4 其他收入'})">5.1.4 其他收入</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.1.5 学校总收入中其他情况'})">5.1.5 学校总收入中其他情况</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'5.2.1 教学改革及研究'})">5.2.1 教学改革及研究</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.2.2 师资建设'})">5.2.2 师资建设</a></div>
                    <div class="f14px-50b"><a @click="go({name:'5.2.3 其他支出'})">5.2.3 其他支出</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>6 师资队伍</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                     <div class="f14px-50b"><a @click="go({name:'6.2 教师授课情况'})">6.2 教师授课情况</a></div>
                     <div class="f14px-50b"><a @click="go({name:'6.3 教师其他情况'})">6.3 教师其他情况</a></div>
                   </div>
                
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>7 专业</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b">7.1 专业设置</div>
                    <div class="f14px-50b"><a @click="go({name:'7.1.1 开设专业'})">7.1.1 开设专业<span class="f14px-red">（数据源）</span></a></div>
                    <div class="f14px-50b"><a @click="go({name:'7.1.2 专业带头人'})">7.1.2 专业带头人</a></div>
                    <div class="f14px-50b"><a @click="go({name:'7.1.3 专业负责人'})">7.1.3 专业负责人</a></div>
                    <div class="f14px-50b">7.3 职业资格证书与社会培训</div>
                    <div class="f14px-50b"><a @click="go({name:'7.3.1 职业资格证书'})">7.3.1 职业资格证书</a></div>
                    <div class="f14px-50b"><a @click="go({name:'7.3.2 应届毕业生获证及社会培训情况'})">7.3.2 应届毕业生获证及社会培训情况</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'7.4 顶岗实习'})">7.4 顶岗实习</a></div>
                    <div class="f14px-50b">7.5 产学合作</div>
                     <div class="f14px-50b"><a @click="go({name:'7.5.1 产学合作基本情况'})">7.5.1 产学合作基本情况</a></div>
                      <div class="f14px-50b"><a @click="go({name:'7.5.2 现代学徒制培养'})">7.5.2 现代学徒制培养</a></div>
                    <div class="f14px-50b">7.6 招生就业情况</div>
                    <div class="f14px-50b"><a @click="go({name:'7.6.1 招生'})">7.6.1 招生</a></div>
                    <div class="f14px-50b"><a @click="go({name:'7.6.3 上届毕业生就业情况'})"> 7.6.3 上届毕业生就业情况</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>8 教学管理与教学研究</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'8.1 教学与学生管理文件'})" >8.1 教学与学生管理文件</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.2 专职教学管理人员情况'})">8.2 专职教学管理人员情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.3 专职学生管理人员情况'})">8.3 专职学生管理人员情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.4 专职招生就业指导人员情况'})">8.4 专职招生就业指导人员情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.5 专职督导人员情况'})">8.5 专职督导人员情况</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'8.6 专职教学研究人员情况'})">8.6 专职教学研究人员情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.7 评教情况'})">8.7 评教情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.8 奖助学情况'})">8.8 奖助学情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'8.9 重大制度创新'})">8.9 重大制度创新</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>9 社会评价</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                     <div class="f14px-50b"><a @click="go({name:'9.3 社会捐赠情况'})">9.3 社会捐赠情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'9.4 就业单位与联系人'})">9.4 就业单位与联系人</a></div>
                    <div class="f14px-50b"><a @click="go({name:'9.5 质量工程'})">9.5 质量工程</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b">9.6 获奖情况</div>
                    <div class="f14px-50b"><a @click="go({name:'9.6.1 学生获奖情况'})">9.6.1 学生获奖情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'9.6.2 学校获奖情况'})">9.6.2 学校获奖情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'9.6.3 学生社团、红十字会获奖情况'})"> 9.6.3 学生社团、红十字会获奖情况</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>10 学生信息（扩展）</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b">10.1 学生信息</div>
                    <div class="f14px-50b"><a @click="go({name:'10.1.2 学生就业信息表'})">10.1.2 学生就业信息表</a></div>
                    <div class="f14px-50b">10.2 辍学情况</div>
                    <div class="f14px-50b"><a @click="go({name:'10.2.1 辍学学生明细表'})">10.2.1 辍学学生明细表</a></div>
                   
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'10.3 学生社团'})">10.3 学生社团</a></div>
                    <div class="f14px-50b"><a @click="go({name:'10.4 红十字会'})">10.4 红十字会</a></div>
                    <div class="f14px-50b"><a @click="go({name:'10.5 志愿者活动'})">10.5 志愿者活动</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

        <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>11 新增数据项</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'11.1 当年专业变动情况'})">11.1 当年专业变动情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'11.2 在校学生的地区、户口所在地及民族等情况'})">11.2 在校学生的地区、户口所在地及民族等情况</a></div>
                    <div class="f14px-50b"><a @click="go({name:'11.3 复转军人、退役军人情况'})">11.3 复转军人、退役军人情况</a></div>
                  </div>
                  <div class="col-md-6 col-xs-12">
                    <div class="f14px-50b"><a @click="go({name:'11.5 补充2020-2021学年开设专业'})">11.5 2020-2021学年开设专业</a></div>
                    <div class="f14px-50b"><a @click="go({name:'11.6 补充2020年9月后入学新生信息'})">11.6 2020年9月后入学新生信息</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

         <div class="row">
          <div class="col-lg-12">
            <section class="panel">
              <div class="panel-heading">
                <h4>12 补充</h4>
              </div>
              <div class="panel-body">
                <div class="row">
                  <div class="col-md-12 col-xs-12">
                    <div class="f14px-50b"><a  @click="go({name:'12.1 平台未尽事宜说明'})">12.1 平台未尽事宜说明</a></div>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>

  

       

      </div>
    </div>
    <div v-else>
      <router-view />
    </div>
  </div>
</template>
<script>
import { getUser } from "@/utils/auth";
import linq from "linq"
import { add任务, delete任务, update任务, get任务 } from "@/api/任务.js";
export default {
  components: {
   
  },
data: function() {
     return {
       user:null,
       tasks:{},
       }
  },
  async created(){

      var user=getUser();
      var temp = await get任务(user.XXID, user.CJPC);
      var mytasks = linq.from(temp).where(`$.XM=='${user.XM}'`).toArray();
      await Promise.all(mytasks.map(async task=>{
      
              await Promise.all(task.AUDIT_TABLES.split(",").map(async e=>{
                var res = await getStatusSummary(e,user.XXID, user.CJPC);
                if(res){
                  res.任务类型 ='数据审核';
                  res.DESC = task.DESC;
                  res.BEGINTIME = new Date(task.BEGINTIME).toLocaleDateString();
                  res.ENDTIME = new Date(task.ENDTIME).toLocaleDateString();
                   this.tasks[res.表名]=res.待审核数;
                }
              }))
      }))
  },
  methods: {
     go(item) {
        
          var user = getUser();
          
          
          if (
            user.ROLE_AUDIT.split(",").indexOf(item.name) !== -1 ||
            user.ROLE_AUDIT.indexOf("admin") !== -1
          ) {
            this.$router.push({
              name: item.name,
              query: {
                 mode: "audit",
                param: item.param
              }
            });
          }
          else if (
        user.ROLE_AUDIT.split(",").find(e => e.indexOf("6.3") !== -1)
      ) {
        if (item.name.indexOf("6.3") !== -1) {
          this.$router.push({
            name: item.name,
            query: {
              mode: "input",
              param: item.param
            }
          });
        }
      }  else {
            this.$alert("你没有权限审核");
          }
        }
      
  }
};
</script>

